// public 实例、继承都能访问
// private 实例、继承都不能访问
// protected 实例不能访问，继承可以访问

class Person {
    protected name: string = 'jspang'

    public sayHello(): void {
        console.log(this.name + ' say Hello')
    }
}

class Teacher extends Person {
    public sayBye(): void {
        console.log(this.name + ' say Bye')
    }
}

const person = new Teacher()
// person.name = 'jspang'
// console.log(person.name)
person.sayHello()
person.sayBye()

console.log(1)
